package com.prizedraw.prize_draw.entity;


import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

/**
 * <p>
 *
 * </p>
 *
 * @author czj666
 * @since 2021-09-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Draw extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @NotBlank( message = "活动名称不能为空")
    private String title;

    private String remark;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date releaseTime;

    private Integer state;

    @TableField(exist = false)
    private List<Department> drawScope;

    @Valid
    @TableField(exist = false)
    private List<Prize> prizeList;

}
